import request from "@/utils/request.js"

export const roleListService = ()=>request.get('/roles')
export const addRoleService = (data)=>request.post('/roles',data)
export const deleteRoleService = (id)=>request.delete(`/roles/${id}`)
export const updateRoleService = (id,data)=>request.put(`/roles/${id}`,data)
export const updateUserRoleService = (id,rid)=>request.put(`/users/${id}/role`, {'rid':rid})